from flask_script import Manager
from app import app
from db_scripts import DBManager
from flask_migrate import Migrate, MigrateCommand
from exts import db
from models import Article

manager = Manager(app)
# 使用flask_migrate必须绑定app和db
migrate = Migrate(app, db)
# 把MigrateCommand命令添加到manager中
manager.add_command('db', MigrateCommand)


@manager.command
def runserver():
    print('the server is running')


if __name__ == '__main__':
    manager.run()
